﻿namespace TimeManagement.DataAccess
{
    using Configurations;
    using Models;
    using System.Data.Entity;

    public class TimeManagementContext : DbContext
    {
        public TimeManagementContext()
            :base("name=TimeManagementConnectionString")
        {}

        public DbSet<UserGroup> UserGroups { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new UserGroupConfiguration());
            modelBuilder.Configurations.Add(new UserConfiguration());
        }
    }
}
